package com.yao.club.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserFollowMapper {

    /**
     * 检查用户是否关注了另一个用户
     * @param followerId 关注者ID
     * @param followedId 被关注者ID
     * @return 是否关注
     */
    @Select("SELECT COUNT(*) > 0 FROM user_follow " +
            "WHERE follower_id = #{followerId} " +
            "AND followed_id = #{followedId} " )
    boolean checkFollowStatus(@Param("followerId") String followerId, 
                            @Param("followedId") String followedId);
} 